package com.numbfish.ch_10.seven_blocking_queue.ConcurrentLinkedDeque.src.test1 ;

import com.numbfish.ch_10.seven_blocking_queue.ConcurrentLinkedDeque.src.myservice.MyService;
import com.numbfish.ch_10.seven_blocking_queue.ConcurrentLinkedDeque.src.extthread.ThreadA;
import com.numbfish.ch_10.seven_blocking_queue.ConcurrentLinkedDeque.src.extthread.ThreadB;

public class Test {

	public static void main(String[] args) {
		try {
			MyService service = new MyService();
			ThreadA a = new ThreadA(service);
			ThreadB b = new ThreadB(service);

			a.start();
			b.start();
			a.join();
			b.join();

			System.out.println(service.queue.size());
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

}